<!-- <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <p>测试</p>
   <button id="btn">点我发消息</button>
	<script src="../../ZGZ/until/socket.io.js"></script>
	<script>
		let socket=io.connect('http://localhost:3001')
		console.log(socket)
		socket.on('textmsg',function(data){
			alert(data)
		})
		btn.onclick=function(){
			socket.emit('textmsg','你愁啥')
		}
	</script>
</body>
</html> -->